import request from "@/utils/request"
import type { UserInfoResponseData,UserData,UserLoginResponseData, UserInfo } from "./type"

// 用户登录接口
export const reqUserLogin = (data: UserData) => request.post<any,UserLoginResponseData>("/login",data)

// 获取用户信息
export const reqUserInfo = (userName: string) => request.get<any, UserInfoResponseData>(`/user/${userName}`)

// 用户注册接口
export const reqUserRegister = (data: UserData) => request.post<any,any>("/register",data)

// 更新用户信息
export const reqUserUpdate = (data:any) => request.post<any,any>("/user/update",data)

// 修改用户密码
export const updateUserPassword = (data:any) => request.post<any,any>("/user/update/password",data)

// 用户余额充值
export const reqCharge = (data:any) => request.post<any,any>("/user/money",data)
 